<!-- son组件 -->
<template>
      <h1>我是子组件</h1>
      <!-- 默认插槽 -->
      <!-- 作用域插槽可以将当前组件的数据传递给组附件 -->
      <slot name="header" :sonData="data" ></slot>
   
</template>

<script setup>
import { reactive , onMounted } from 'vue'
import { useText } from '../../hooks/useTest';
let data = reactive({
    name:'Jack'
})

onMounted(()=>{
    console.log('son组件挂载')
    console.log(textHooks.text.value);
})
let textHooks = useText()
</script>

<style lang="scss" scoped>

</style>